<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <!-- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">-->
    <title>徽章</title>

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
    <!--<link rel="stylesheet" href="../../../libs/bootstrap4/css/bootstrap.css">-->

    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
    <style>
        body>div{
            margin-bottom: 50px;
        }
    </style>
</head>
<body>
<div class="container">
    <h2>徽章</h2>
    <h1>测试标题 <span class="badge badge-secondary">New</span></h1>
    <h2>测试标题 <span class="badge badge-secondary">New</span></h2>
    <h3>测试标题 <span class="badge badge-secondary">New</span></h3>
    <h4>测试标题 <span class="badge badge-secondary">New</span></h4>
    <h5>测试标题 <span class="badge badge-secondary">New</span></h5>
    <h6>测试标题 <span class="badge badge-secondary">New</span></h6>
</div>
<div class="container">
    <h2>各种颜色类型的徽章</h2>
    <span class="badge badge-primary">主要</span>
    <span class="badge badge-secondary">次要</span>
    <span class="badge badge-success">成功</span>
    <span class="badge badge-danger">危险</span>
    <span class="badge badge-warning">警告</span>
    <span class="badge badge-info">信息</span>
    <span class="badge badge-light">浅色</span>
    <span class="badge badge-dark">深色</span>
</div>
<div class="container">
    <h2>药丸形状徽章</h2>
    <span class="badge badge-pill badge-default">默认</span>
    <span class="badge badge-pill badge-primary">主要</span>
    <span class="badge badge-pill badge-success">成功</span>
    <span class="badge badge-pill badge-info">信息</span>
    <span class="badge badge-pill badge-warning">警告</span>
    <span class="badge badge-pill badge-danger">危险</span>
</div>

<div class="container">
    <h2>徽章嵌入到按钮内</h2>
    <button type="button" class="btn btn-primary">
        Messages <span class="badge badge-light">4</span>
    </button>
    <button type="button" class="btn btn-danger">
        Notifications <span class="badge badge-light">7</span>
    </button>
</div>
</body>
</html>